
<table id="inbox-table" class="table table-striped table-hover">
	<tbody> 
		<tr id="msg15" class="unread">
			<td class="inbox-table-icon">
				<div class="checkbox">
					<label>
						<input type="checkbox" class="checkbox style-2">
						<span></span> </label>
				</div>
			</td>
			<td class="inbox-data-from hidden-xs hidden-sm">
				<div>
					<i class="fa fa-warning text-warning"></i> 系统邮件
				</div>
			</td>
			<td class="inbox-data-message">
				<div>
					<span><span class="label bg-color-orange">工作</span> 系统更新</span> 2:00 上午 到 4:00 下午
				</div>
			</td>
			<td class="inbox-data-attachment hidden-xs">
				<div>

				</div>
			</td>
			<td class="inbox-data-date hidden-xs">
				<div>
					10:23 上午
				</div>
			</td>
		</tr>  

		<tr id="msg2" class="unread">
			<td class="inbox-table-icon">
				<div class="checkbox">
					<label>
						<input type="checkbox" class="checkbox style-2">
						<span></span> </label>
				</div>
			</td>
			<td class="inbox-data-from hidden-xs hidden-sm">
				<div>
					系统邮件
				</div>
			</td>
			<td class="inbox-data-message">
				<div>
					<span><span class="label bg-color-teal">家</span>Tinyframework.com</span>您有一个新朋友!....
				</div>
			</td>
			<td class="inbox-data-attachment hidden-xs">
				<div>
					<a href="javascript:void(0);" rel="tooltip" data-placement="left" data-original-title="rocketlaunch.jpg, timelogs.xsl" class="txt-color-darken"><i class="fa fa-paperclip fa-lg"></i></a>
				</div>
			</td>
			<td class="inbox-data-date hidden-xs">
				<div>
					10:23 上午
				</div>
			</td>
		</tr>
		
		<tr id="msg6">
			<td class="inbox-table-icon">
				<div class="checkbox">
					<label>
						<input type="checkbox" class="checkbox style-2">
						<span></span> </label>
				</div>
			</td>
			<td class="inbox-data-from hidden-xs hidden-sm">
				<div>
					王某人 <span class="text-danger">草稿</span>
				</div>
			</td>
			<td class="inbox-data-message">
				<div>
					<span>Hey John!</span> Sed ut perspiciatis unde omnis...
				</div>
			</td>
			<td class="inbox-data-attachment hidden-xs">
				<div>
					
				</div>
			</td>
			<td class="inbox-data-date hidden-xs">
				<div>
					10:23 上午
				</div>
			</td>
		</tr>

		<tr id="msg29">
	<td class="inbox-table-icon">
		<div class="checkbox">
			<label>
				<input type="checkbox" class="checkbox style-2">
				<span></span> </label>
		</div>
	</td>
	<td class="inbox-data-from hidden-xs hidden-sm">
		<div>
			系统
		</div>
	</td>
	<td class="inbox-data-message">
		<div>
			<span>Tinyframework</span> 您有一个新朋友!
		</div>
	</td>
	<td class="inbox-data-attachment hidden-xs">
		<div>

		</div>
	</td>
	<td class="inbox-data-date hidden-xs">
		<div>
			10:23 上午
		</div>
	</td>
</tr>
		<tr id="msg29">
	<td class="inbox-table-icon">
		<div class="checkbox">
			<label>
				<input type="checkbox" class="checkbox style-2">
				<span></span> </label>
		</div>
	</td>
	<td class="inbox-data-from hidden-xs hidden-sm">
		<div>
			系统
		</div>
	</td>
	<td class="inbox-data-message">
		<div>
			<span>Tinyframework</span> 您有一个新朋友!
		</div>
	</td>
	<td class="inbox-data-attachment hidden-xs">
		<div>

		</div>
	</td>
	<td class="inbox-data-date hidden-xs">
		<div>
			10:23 上午
		</div>
	</td>
</tr>
		<tr id="msg29">
	<td class="inbox-table-icon">
		<div class="checkbox">
			<label>
				<input type="checkbox" class="checkbox style-2">
				<span></span> </label>
		</div>
	</td>
	<td class="inbox-data-from hidden-xs hidden-sm">
		<div>
			系统
		</div>
	</td>
	<td class="inbox-data-message">
		<div>
			<span>Tinyframework</span> 您有一个新朋友!
		</div>
	</td>
	<td class="inbox-data-attachment hidden-xs">
		<div>

		</div>
	</td>
	<td class="inbox-data-date hidden-xs">
		<div>
			10:23 上午
		</div>
	</td>
</tr>
		<tr id="msg29">
	<td class="inbox-table-icon">
		<div class="checkbox">
			<label>
				<input type="checkbox" class="checkbox style-2">
				<span></span> </label>
		</div>
	</td>
	<td class="inbox-data-from hidden-xs hidden-sm">
		<div>
			系统
		</div>
	</td>
	<td class="inbox-data-message">
		<div>
			<span>Tinyframework</span> 您有一个新朋友!
		</div>
	</td>
	<td class="inbox-data-attachment hidden-xs">
		<div>

		</div>
	</td>
	<td class="inbox-data-date hidden-xs">
		<div>
			10:23 上午
		</div>
	</td>
</tr>
		<tr id="msg29">
	<td class="inbox-table-icon">
		<div class="checkbox">
			<label>
				<input type="checkbox" class="checkbox style-2">
				<span></span> </label>
		</div>
	</td>
	<td class="inbox-data-from hidden-xs hidden-sm">
		<div>
			系统
		</div>
	</td>
	<td class="inbox-data-message">
		<div>
			<span>Tinyframework</span> 您有一个新朋友!
		</div>
	</td>
	<td class="inbox-data-attachment hidden-xs">
		<div>

		</div>
	</td>
	<td class="inbox-data-date hidden-xs">
		<div>
			10:23 上午
		</div>
	</td>
</tr>
		<tr id="msg29">
	<td class="inbox-table-icon">
		<div class="checkbox">
			<label>
				<input type="checkbox" class="checkbox style-2">
				<span></span> </label>
		</div>
	</td>
	<td class="inbox-data-from hidden-xs hidden-sm">
		<div>
			系统
		</div>
	</td>
	<td class="inbox-data-message">
		<div>
			<span>Tinyframework</span> 您有一个新朋友!
		</div>
	</td>
	<td class="inbox-data-attachment hidden-xs">
		<div>

		</div>
	</td>
	<td class="inbox-data-date hidden-xs">
		<div>
			10:23 上午
		</div>
	</td>
</tr>
		<tr id="msg29">
	<td class="inbox-table-icon">
		<div class="checkbox">
			<label>
				<input type="checkbox" class="checkbox style-2">
				<span></span> </label>
		</div>
	</td>
	<td class="inbox-data-from hidden-xs hidden-sm">
		<div>
			系统
		</div>
	</td>
	<td class="inbox-data-message">
		<div>
			<span>Tinyframework</span> 您有一个新朋友!
		</div>
	</td>
	<td class="inbox-data-attachment hidden-xs">
		<div>

		</div>
	</td>
	<td class="inbox-data-date hidden-xs">
		<div>
			10:23 上午
		</div>
	</td>
</tr>
		<tr id="msg29">
	<td class="inbox-table-icon">
		<div class="checkbox">
			<label>
				<input type="checkbox" class="checkbox style-2">
				<span></span> </label>
		</div>
	</td>
	<td class="inbox-data-from hidden-xs hidden-sm">
		<div>
			系统
		</div>
	</td>
	<td class="inbox-data-message">
		<div>
			<span>Tinyframework</span> 您有一个新朋友!
		</div>
	</td>
	<td class="inbox-data-attachment hidden-xs">
		<div>

		</div>
	</td>
	<td class="inbox-data-date hidden-xs">
		<div>
			10:23 上午
		</div>
	</td>
</tr>
		<tr id="msg29">
	<td class="inbox-table-icon">
		<div class="checkbox">
			<label>
				<input type="checkbox" class="checkbox style-2">
				<span></span> </label>
		</div>
	</td>
	<td class="inbox-data-from hidden-xs hidden-sm">
		<div>
			系统
		</div>
	</td>
	<td class="inbox-data-message">
		<div>
			<span>Tinyframework</span> 您有一个新朋友!
		</div>
	</td>
	<td class="inbox-data-attachment hidden-xs">
		<div>

		</div>
	</td>
	<td class="inbox-data-date hidden-xs">
		<div>
			10:23 上午
		</div>
	</td>
</tr>
		<tr id="msg29">
	<td class="inbox-table-icon">
		<div class="checkbox">
			<label>
				<input type="checkbox" class="checkbox style-2">
				<span></span> </label>
		</div>
	</td>
	<td class="inbox-data-from hidden-xs hidden-sm">
		<div>
			系统
		</div>
	</td>
	<td class="inbox-data-message">
		<div>
			<span>Tinyframework</span> 您有一个新朋友!
		</div>
	</td>
	<td class="inbox-data-attachment hidden-xs">
		<div>

		</div>
	</td>
	<td class="inbox-data-date hidden-xs">
		<div>
			10:23 上午
		</div>
	</td>
</tr>
		<tr id="msg29">
	<td class="inbox-table-icon">
		<div class="checkbox">
			<label>
				<input type="checkbox" class="checkbox style-2">
				<span></span> </label>
		</div>
	</td>
	<td class="inbox-data-from hidden-xs hidden-sm">
		<div>
			系统
		</div>
	</td>
	<td class="inbox-data-message">
		<div>
			<span>Tinyframework</span> 您有一个新朋友!
		</div>
	</td>
	<td class="inbox-data-attachment hidden-xs">
		<div>

		</div>
	</td>
	<td class="inbox-data-date hidden-xs">
		<div>
			10:23 上午
		</div>
	</td>
</tr>
		<tr id="msg29">
	<td class="inbox-table-icon">
		<div class="checkbox">
			<label>
				<input type="checkbox" class="checkbox style-2">
				<span></span> </label>
		</div>
	</td>
	<td class="inbox-data-from hidden-xs hidden-sm">
		<div>
			系统
		</div>
	</td>
	<td class="inbox-data-message">
		<div>
			<span>Tinyframework</span> 您有一个新朋友!
		</div>
	</td>
	<td class="inbox-data-attachment hidden-xs">
		<div>

		</div>
	</td>
	<td class="inbox-data-date hidden-xs">
		<div>
			10:23 上午
		</div>
	</td>
</tr>
		<tr id="msg29">
	<td class="inbox-table-icon">
		<div class="checkbox">
			<label>
				<input type="checkbox" class="checkbox style-2">
				<span></span> </label>
		</div>
	</td>
	<td class="inbox-data-from hidden-xs hidden-sm">
		<div>
			系统
		</div>
	</td>
	<td class="inbox-data-message">
		<div>
			<span>Tinyframework</span> 您有一个新朋友!
		</div>
	</td>
	<td class="inbox-data-attachment hidden-xs">
		<div>

		</div>
	</td>
	<td class="inbox-data-date hidden-xs">
		<div>
			10:23 上午
		</div>
	</td>
</tr>
		<tr id="msg29">
	<td class="inbox-table-icon">
		<div class="checkbox">
			<label>
				<input type="checkbox" class="checkbox style-2">
				<span></span> </label>
		</div>
	</td>
	<td class="inbox-data-from hidden-xs hidden-sm">
		<div>
			系统
		</div>
	</td>
	<td class="inbox-data-message">
		<div>
			<span>Tinyframework</span> 您有一个新朋友!
		</div>
	</td>
	<td class="inbox-data-attachment hidden-xs">
		<div>

		</div>
	</td>
	<td class="inbox-data-date hidden-xs">
		<div>
			10:23 上午
		</div>
	</td>
</tr>
		<tr id="msg29">
	<td class="inbox-table-icon">
		<div class="checkbox">
			<label>
				<input type="checkbox" class="checkbox style-2">
				<span></span> </label>
		</div>
	</td>
	<td class="inbox-data-from hidden-xs hidden-sm">
		<div>
			系统
		</div>
	</td>
	<td class="inbox-data-message">
		<div>
			<span>Tinyframework</span> 您有一个新朋友!
		</div>
	</td>
	<td class="inbox-data-attachment hidden-xs">
		<div>

		</div>
	</td>
	<td class="inbox-data-date hidden-xs">
		<div>
			10:23 上午
		</div>
	</td>
</tr>
		<tr id="msg29">
	<td class="inbox-table-icon">
		<div class="checkbox">
			<label>
				<input type="checkbox" class="checkbox style-2">
				<span></span> </label>
		</div>
	</td>
	<td class="inbox-data-from hidden-xs hidden-sm">
		<div>
			系统
		</div>
	</td>
	<td class="inbox-data-message">
		<div>
			<span>Tinyframework</span> 您有一个新朋友!
		</div>
	</td>
	<td class="inbox-data-attachment hidden-xs">
		<div>

		</div>
	</td>
	<td class="inbox-data-date hidden-xs">
		<div>
			10:23 上午
		</div>
	</td>
</tr>
		<tr id="msg29">
	<td class="inbox-table-icon">
		<div class="checkbox">
			<label>
				<input type="checkbox" class="checkbox style-2">
				<span></span> </label>
		</div>
	</td>
	<td class="inbox-data-from hidden-xs hidden-sm">
		<div>
			系统
		</div>
	</td>
	<td class="inbox-data-message">
		<div>
			<span>Tinyframework</span> 您有一个新朋友!
		</div>
	</td>
	<td class="inbox-data-attachment hidden-xs">
		<div>

		</div>
	</td>
	<td class="inbox-data-date hidden-xs">
		<div>
			10:23 上午
		</div>
	</td>
</tr>
		<tr id="msg29">
	<td class="inbox-table-icon">
		<div class="checkbox">
			<label>
				<input type="checkbox" class="checkbox style-2">
				<span></span> </label>
		</div>
	</td>
	<td class="inbox-data-from hidden-xs hidden-sm">
		<div>
			系统
		</div>
	</td>
	<td class="inbox-data-message">
		<div>
			<span>Tinyframework</span> 您有一个新朋友!
		</div>
	</td>
	<td class="inbox-data-attachment hidden-xs">
		<div>

		</div>
	</td>
	<td class="inbox-data-date hidden-xs">
		<div>
			10:23 上午
		</div>
	</td>
</tr>
		<tr id="msg29">
	<td class="inbox-table-icon">
		<div class="checkbox">
			<label>
				<input type="checkbox" class="checkbox style-2">
				<span></span> </label>
		</div>
	</td>
	<td class="inbox-data-from hidden-xs hidden-sm">
		<div>
			系统
		</div>
	</td>
	<td class="inbox-data-message">
		<div>
			<span>Tinyframework</span> 您有一个新朋友!
		</div>
	</td>
	<td class="inbox-data-attachment hidden-xs">
		<div>

		</div>
	</td>
	<td class="inbox-data-date hidden-xs">
		<div>
			10:23 上午
		</div>
	</td>
</tr>
		<tr id="msg29">
	<td class="inbox-table-icon">
		<div class="checkbox">
			<label>
				<input type="checkbox" class="checkbox style-2">
				<span></span> </label>
		</div>
	</td>
	<td class="inbox-data-from hidden-xs hidden-sm">
		<div>
			系统
		</div>
	</td>
	<td class="inbox-data-message">
		<div>
			<span>Tinyframework</span> 您有一个新朋友!
		</div>
	</td>
	<td class="inbox-data-attachment hidden-xs">
		<div>

		</div>
	</td>
	<td class="inbox-data-date hidden-xs">
		<div>
			10:23 上午
		</div>
	</td>
</tr>
		<tr id="msg29">
	<td class="inbox-table-icon">
		<div class="checkbox">
			<label>
				<input type="checkbox" class="checkbox style-2">
				<span></span> </label>
		</div>
	</td>
	<td class="inbox-data-from hidden-xs hidden-sm">
		<div>
			系统
		</div>
	</td>
	<td class="inbox-data-message">
		<div>
			<span>Tinyframework</span> 您有一个新朋友!
		</div>
	</td>
	<td class="inbox-data-attachment hidden-xs">
		<div>

		</div>
	</td>
	<td class="inbox-data-date hidden-xs">
		<div>
			10:23 上午
		</div>
	</td>
</tr>
		<tr id="msg29">
	<td class="inbox-table-icon">
		<div class="checkbox">
			<label>
				<input type="checkbox" class="checkbox style-2">
				<span></span> </label>
		</div>
	</td>
	<td class="inbox-data-from hidden-xs hidden-sm">
		<div>
			系统
		</div>
	</td>
	<td class="inbox-data-message">
		<div>
			<span>Tinyframework</span> 您有一个新朋友!
		</div>
	</td>
	<td class="inbox-data-attachment hidden-xs">
		<div>

		</div>
	</td>
	<td class="inbox-data-date hidden-xs">
		<div>
			10:23 上午
		</div>
	</td>
</tr>
		<tr id="msg29">
	<td class="inbox-table-icon">
		<div class="checkbox">
			<label>
				<input type="checkbox" class="checkbox style-2">
				<span></span> </label>
		</div>
	</td>
	<td class="inbox-data-from hidden-xs hidden-sm">
		<div>
			系统
		</div>
	</td>
	<td class="inbox-data-message">
		<div>
			<span>Tinyframework</span> 您有一个新朋友!
		</div>
	</td>
	<td class="inbox-data-attachment hidden-xs">
		<div>

		</div>
	</td>
	<td class="inbox-data-date hidden-xs">
		<div>
			10:23 上午
		</div>
	</td>
</tr>
		<tr id="msg29">
	<td class="inbox-table-icon">
		<div class="checkbox">
			<label>
				<input type="checkbox" class="checkbox style-2">
				<span></span> </label>
		</div>
	</td>
	<td class="inbox-data-from hidden-xs hidden-sm">
		<div>
			系统
		</div>
	</td>
	<td class="inbox-data-message">
		<div>
			<span>Tinyframework</span> 您有一个新朋友!
		</div>
	</td>
	<td class="inbox-data-attachment hidden-xs">
		<div>

		</div>
	</td>
	<td class="inbox-data-date hidden-xs">
		<div>
			10:23 上午
		</div>
	</td>
</tr>
		<tr id="msg29">
	<td class="inbox-table-icon">
		<div class="checkbox">
			<label>
				<input type="checkbox" class="checkbox style-2">
				<span></span> </label>
		</div>
	</td>
	<td class="inbox-data-from hidden-xs hidden-sm">
		<div>
			系统
		</div>
	</td>
	<td class="inbox-data-message">
		<div>
			<span>Tinyframework</span> 您有一个新朋友!
		</div>
	</td>
	<td class="inbox-data-attachment hidden-xs">
		<div>

		</div>
	</td>
	<td class="inbox-data-date hidden-xs">
		<div>
			10:23 上午
		</div>
	</td>
</tr>
		<tr id="msg29">
	<td class="inbox-table-icon">
		<div class="checkbox">
			<label>
				<input type="checkbox" class="checkbox style-2">
				<span></span> </label>
		</div>
	</td>
	<td class="inbox-data-from hidden-xs hidden-sm">
		<div>
			系统
		</div>
	</td>
	<td class="inbox-data-message">
		<div>
			<span>Tinyframework</span> 您有一个新朋友!
		</div>
	</td>
	<td class="inbox-data-attachment hidden-xs">
		<div>

		</div>
	</td>
	<td class="inbox-data-date hidden-xs">
		<div>
			10:23 上午
		</div>
	</td>
</tr>
	</tbody>
</table>

<script>

    //Gets tooltips activated
    $("#inbox-table [rel=tooltip]").tooltip();

    $("#inbox-table input[type='checkbox']").change(function() {
        $(this).closest('tr').toggleClass("highlight", this.checked);
    });

    $("#inbox-table .inbox-data-message").click(function() {
        $this = $(this);
        getMail($this);
    })
    $("#inbox-table .inbox-data-from").click(function() {
        $this = $(this);
        getMail($this);
    })
    function getMail($this) {
        //console.log($this.closest("tr").attr("id"));
        loadURL("ajax/email-opened.pagelet", $('#inbox-content > .table-wrap'));
    }


    $('.inbox-table-icon input:checkbox').click(function() {
        enableDeleteButton();
    })

    $(".deletebutton").click(function() {
        $('#inbox-table td input:checkbox:checked').parents("tr").rowslide();
        //$(".inbox-checkbox-triggered").removeClass('visible');
        //$("#compose-mail").show();
    });

    function enableDeleteButton() {
        var isChecked = $('.inbox-table-icon input:checkbox').is(':checked');

        if (isChecked) {
            $(".inbox-checkbox-triggered").addClass('visible');
            //$("#compose-mail").hide();
        } else {
            $(".inbox-checkbox-triggered").removeClass('visible');
            //$("#compose-mail").show();
        }
    } 
</script><script>
	
	//Gets tooltips activated
	$("#inbox-table [rel=tooltip]").tooltip();

	$("#inbox-table input[type='checkbox']").change(function() {
		$(this).closest('tr').toggleClass("highlight", this.checked);
	});

	$("#inbox-table .inbox-data-message").click(function() {
		$this = $(this);
		getMail($this);
	})
	$("#inbox-table .inbox-data-from").click(function() {
		$this = $(this);
		getMail($this);
	})
	function getMail($this) {
		//console.log($this.closest("tr").attr("id"));
		loadURL("ajax/email-opened.html", $('#inbox-content > .table-wrap'));
	}


	$('.inbox-table-icon input:checkbox').click(function() {
		enableDeleteButton();
	})

	$(".deletebutton").click(function() {
		$('#inbox-table td input:checkbox:checked').parents("tr").rowslide();
		//$(".inbox-checkbox-triggered").removeClass('visible');
		//$("#compose-mail").show();
	});

	function enableDeleteButton() {
		var isChecked = $('.inbox-table-icon input:checkbox').is(':checked');

		if (isChecked) {
			$(".inbox-checkbox-triggered").addClass('visible');
			//$("#compose-mail").hide();
		} else {
			$(".inbox-checkbox-triggered").removeClass('visible');
			//$("#compose-mail").show();
		}
	}
	
</script>